// ==UserScript== // @name Billing Button // @include *oscar/billing/CA/ON/billingONCorrection.jsp?billing_no=* // @include *oscar/billing/CA/ON/billingCorrection.jsp?billing_no=* // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js // ==/UserScript== console.log(document.getElementsByName("submit")); var input16 = document.createElement('input'); input16.type = 'button'; input16.value = 'Rebill'; input16.onclick = showAlert16; input16.setAttribute('style', 'width:300px;height:100px;font-size:40px;z-index:1;position:fixed;bottom:400px;right:0px'); document.body.appendChild(input16); function showAlert16() { document.querySelector("select[name='status']").value = "O"; document.getElementsByName("submit")[1].click(); }; var input17 = document.createElement('input'); input17.type = 'button'; input17.value = 'Settle'; input17.onclick = showAlert17; input17.setAttribute('style', 'width:300px;height:100px;font-size:40px;z-index:1;position:fixed;bottom:200px;right:0px'); document.body.appendChild(input17); function showAlert17() { document.querySelector("select[name='status']").value = "S"; document.getElementsByName("submit")[1].click(); };